From Mike, sf.x.mh2@spamgourmet.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 26 Oct 2005 17:01:12 +0000 (17:01 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 26 Oct 2005 17:01:12 +0000 (17:01 +0000)
> Since the date is taken from the RMC sentence of the PREVIOUS second, the
> current implementation writes a wrong date when the time jumps from 235959
> to 000000. This can be fixed by the following patch:
>

gpsbabel/nmea.c

index 518d86899ca7362df0f3e15d095e63f99806463e..2a5a6008c8eae440e7ebc972d53a4af9c357f19f 100644 (file)
@@ -363,6 +363,9 @@ gprmc_parse(char *ibuf)
                                curr_waypt->speed       = speed*kts2mps;
                        if (curr_waypt->course<=0)
                                curr_waypt->course      = course;
+                       /* The change of date wasn't recorded when 
+                        * going from 235959 to 000000. */
+                       curr_waypt->creation_time = mkgmtime(&tm);
                }
                return;
        }